//
//  NSMutableDictionary+Python.h
//  CommonTools
//
//  Created by caoyuan on 5/24/16.
//  Copyright © 2016 baidu. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSMutableDictionary (Python)
/**
 *  遍历usage:[dic forEach:^(id key, id value) { NSLog(@"-%@ = %@--",key,value); }];
 *
 *  @param block
 */
- (void)forEach: (void (^)(id key, id value))block;
/**
 *  根据value 返回key 用法：dict.keyFromValue(@"someValue");
 *
 *  @param object 你的value 如果没有，返回Nil;
 */
- (id (^)(id value))pyKeyFromValue;

/**
 *  是否含有某个key
 *
 *  @用法  BOOL have = dict.hasKey(@"someKey")
 *
 *  @return 如果找到了此key，返回YES
 */
- (BOOL (^)(id key))pyHasKey;
//- (BOOL)hasKey:(id )key;
/**
 *  是否包含某个value
 *
 *  @usage key = dict.hasValue(@"someValue");
 *
 *  @return 如果包含，返回相应的key，否则返回nil
 */
//- (BOOL)hasValue:(id)value;

- (BOOL (^)(id value))pyHasValue;

@end
